/*
 Navicat Premium Dump SQL

 Source Server         : local-wu24-hyperf-notice
 Source Server Type    : MySQL
 Source Server Version : 80036 (8.0.36)
 Source Host           : 127.0.0.1:3306
 Source Schema         : hyperf_notice

 Target Server Type    : MySQL
 Target Server Version : 80036 (8.0.36)
 File Encoding         : 65001

 Date: 15/09/2025 10:39:44
*/

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for no_campus
-- ----------------------------
DROP TABLE IF EXISTS `no_campus`;
CREATE TABLE `no_campus`
(
    `id`              int          NOT NULL AUTO_INCREMENT COMMENT '校区ID',
    `region_id`       int          NOT NULL COMMENT '所属地级市ID',
    `name`            varchar(100) NOT NULL COMMENT '校区名称',
    `is_headquarters` tinyint(1)            DEFAULT '0' COMMENT '是否为总部：0-否，1-是',
    `sort`            int                   DEFAULT '0' COMMENT '排序序号',
    `created_at`      datetime     NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
    `updated_at`      datetime     NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
    PRIMARY KEY (`id`),
    KEY `idx_region_id` (`region_id`)
) ENGINE = InnoDB
  AUTO_INCREMENT = 8
  DEFAULT CHARSET = utf8mb4
  COLLATE = utf8mb4_0900_ai_ci COMMENT ='校区表';

-- ----------------------------
-- Records of no_campus
-- ----------------------------
BEGIN;
INSERT INTO `no_campus` (`id`, `region_id`, `name`, `is_headquarters`, `sort`, `created_at`, `updated_at`)
VALUES (1, 4, '北京朝阳校区', 1, 1, '2025-09-11 10:55:06', '2025-09-11 10:55:06');
INSERT INTO `no_campus` (`id`, `region_id`, `name`, `is_headquarters`, `sort`, `created_at`, `updated_at`)
VALUES (2, 4, '北京海淀校区', 0, 2, '2025-09-11 10:55:06', '2025-09-11 10:55:06');
INSERT INTO `no_campus` (`id`, `region_id`, `name`, `is_headquarters`, `sort`, `created_at`, `updated_at`)
VALUES (3, 5, '上海浦东校区', 1, 1, '2025-09-11 10:55:06', '2025-09-11 10:55:06');
INSERT INTO `no_campus` (`id`, `region_id`, `name`, `is_headquarters`, `sort`, `created_at`, `updated_at`)
VALUES (4, 6, '广州天河校区', 1, 1, '2025-09-11 10:55:06', '2025-09-11 10:55:06');
INSERT INTO `no_campus` (`id`, `region_id`, `name`, `is_headquarters`, `sort`, `created_at`, `updated_at`)
VALUES (5, 6, '广州越秀校区', 0, 2, '2025-09-11 10:55:06', '2025-09-11 10:55:06');
INSERT INTO `no_campus` (`id`, `region_id`, `name`, `is_headquarters`, `sort`, `created_at`, `updated_at`)
VALUES (6, 7, '深圳南山校区', 1, 1, '2025-09-11 10:55:06', '2025-09-11 10:55:06');
INSERT INTO `no_campus` (`id`, `region_id`, `name`, `is_headquarters`, `sort`, `created_at`, `updated_at`)
VALUES (7, 8, '佛山禅城校区', 1, 1, '2025-09-11 10:55:06', '2025-09-11 10:55:06');
COMMIT;

-- ----------------------------
-- Table structure for no_notice
-- ----------------------------
DROP TABLE IF EXISTS `no_notice`;
CREATE TABLE `no_notice`
(
    `id`                int          NOT NULL AUTO_INCREMENT COMMENT '公告ID',
    `title`             varchar(255) NOT NULL COMMENT '公告标题',
    `subtitle`          varchar(255)          DEFAULT NULL COMMENT '副标题',
    `summary`           text COMMENT '简介',
    `campus_id`         int          NOT NULL COMMENT '所属校区ID',
    `type_id`           int          NOT NULL COMMENT '公告类型ID',
    `recruitment_count` int                   DEFAULT '0' COMMENT '招聘人数',
    `position_count`    int                   DEFAULT '0' COMMENT '职位数量',
    `start_time`        datetime              DEFAULT NULL COMMENT '报名开始时间',
    `end_time`          datetime              DEFAULT NULL COMMENT '报名结束时间',
    `exam_time`         datetime              DEFAULT NULL COMMENT '笔试时间',
    `cover_image`       varchar(255)          DEFAULT NULL COMMENT '图文封面',
    `content`           longtext COMMENT '公告内容',
    `original_url`      varchar(255)          DEFAULT NULL COMMENT '原文链接',
    `is_top`            tinyint(1)   NOT NULL DEFAULT '0' COMMENT '是否置顶：0-否，1-是',
    `top_time`          datetime              DEFAULT NULL COMMENT '置顶时间',
    `status`            tinyint(1)   NOT NULL DEFAULT '0' COMMENT '状态：0-草稿，1-已发布，2-已下架',
    `created_by`        int          NOT NULL COMMENT '创建人ID',
    `created_at`        datetime     NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
    `updated_at`        datetime     NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
    `published_at`      datetime              DEFAULT NULL COMMENT '发布时间',
    PRIMARY KEY (`id`),
    KEY `idx_campus_id` (`campus_id`),
    KEY `idx_type_id` (`type_id`),
    KEY `idx_created_by` (`created_by`),
    KEY `idx_status` (`status`),
    KEY `idx_start_time` (`start_time`, `end_time`),
    KEY `idx_published_at` (`published_at`),
    KEY `idx_is_top` (`is_top`, `top_time`)
) ENGINE = InnoDB
  AUTO_INCREMENT = 6
  DEFAULT CHARSET = utf8mb4
  COLLATE = utf8mb4_0900_ai_ci COMMENT ='公告表';

-- ----------------------------
-- Records of no_notice
-- ----------------------------
BEGIN;
INSERT INTO `no_notice` (`id`, `title`, `subtitle`, `summary`, `campus_id`, `type_id`, `recruitment_count`,
                         `position_count`, `start_time`, `end_time`, `exam_time`, `cover_image`, `content`,
                         `original_url`, `status`, `created_by`, `created_at`, `updated_at`, `published_at`, `is_top`,
                         `top_time`)
VALUES (1, '2023年北京市朝阳区公务员招录公告', '含12个岗位，共招聘30人',
        '本次招录面向社会公开招聘公务员30名，涉及行政、执法等多个岗位', 1, 6, 30, 12, '2023-03-15 09:00:00',
        '2023-03-30 17:00:00', '2023-04-22 09:00:00', '/images/covers/gov1.jpg',
        '<p>本次招录按照公开、平等、竞争、择优的原则，面向社会公开招聘...</p>', 'http://gov.example.com/notices/20230315',
        1, 1, '2025-09-11 10:55:06', '2025-09-11 10:55:06', '2023-03-14 10:30:00', 0, NULL);
INSERT INTO `no_notice` (`id`, `title`, `subtitle`, `summary`, `campus_id`, `type_id`, `recruitment_count`,
                         `position_count`, `start_time`, `end_time`, `exam_time`, `cover_image`, `content`,
                         `original_url`, `status`, `created_by`, `created_at`, `updated_at`, `published_at`, `is_top`,
                         `top_time`)
VALUES (2, '广州市天河区中小学教师招聘公告', '2023年第二季度教师岗位招聘',
        '面向全国招聘中小学教师50名，含语文、数学、英语等学科', 4, 3, 50, 28, '2023-04-01 09:00:00', '2023-04-15 17:00:00',
        '2023-05-13 09:00:00', '/images/covers/teacher1.jpg',
        '<p>为满足我区教育事业发展需要，现面向社会公开招聘中小学教师...</p>', 'http://edu.example.com/notices/20230401',
        1, 2, '2025-09-11 10:55:06', '2025-09-11 10:55:06', '2023-03-31 15:20:00', 0, NULL);
INSERT INTO `no_notice` (`id`, `title`, `subtitle`, `summary`, `campus_id`, `type_id`, `recruitment_count`,
                         `position_count`, `start_time`, `end_time`, `exam_time`, `cover_image`, `content`,
                         `original_url`, `status`, `created_by`, `created_at`, `updated_at`, `published_at`, `is_top`,
                         `top_time`)
VALUES (3, '深圳市南山区人民医院医护人员招聘', '紧急招聘内科、外科医护人员',
        '因业务发展需要，现紧急招聘医护人员20名，待遇从优', 6, 4, 20, 8, '2023-03-20 09:00:00', '2023-04-10 17:00:00',
        '2023-04-25 09:00:00', '/images/covers/medical1.jpg',
        '<p>深圳市南山区人民医院因业务发展需要，现面向社会公开招聘...</p>',
        'http://hospital.example.com/notices/20230320', 1, 3, '2025-09-11 10:55:06', '2025-09-11 10:55:06',
        '2023-03-19 09:10:00', 0, NULL);
INSERT INTO `no_notice` (`id`, `title`, `subtitle`, `summary`, `campus_id`, `type_id`, `recruitment_count`,
                         `position_count`, `start_time`, `end_time`, `exam_time`, `cover_image`, `content`,
                         `original_url`, `status`, `created_by`, `created_at`, `updated_at`, `published_at`, `is_top`,
                         `top_time`)
VALUES (4, '2023年国家公务员考试公告', '中央机关及其直属机构招录', '2023年度国家公务员招录共计2.5万人', 1, 5, 25000,
        16000, '2022-10-25 08:00:00', '2022-11-03 18:00:00', '2022-12-04 09:00:00', '/images/covers/national-gov1.jpg',
        '<p>根据公务员法和《公务员录用规定》等法律法规，国家公务员局将组织实施中央机关及其直属机构2023年度考试录用一级主任科员及以下和其他相当职级层次公务员工作...</p>',
        'http://www.scs.gov.cn/notices/20221024', 2, 1, '2025-09-11 10:55:06', '2025-09-11 10:55:06',
        '2022-10-24 10:00:00', 0, NULL);
INSERT INTO `no_notice` (`id`, `title`, `subtitle`, `summary`, `campus_id`, `type_id`, `recruitment_count`,
                         `position_count`, `start_time`, `end_time`, `exam_time`, `cover_image`, `content`,
                         `original_url`, `status`, `created_by`, `created_at`, `updated_at`, `published_at`, `is_top`,
                         `top_time`)
VALUES (5, '佛山禅城区事业单位招聘公告', '2023年度第一季度招聘', '禅城区12家事业单位公开招聘工作人员35名', 7, 2, 35, 22,
        '2023-05-01 09:00:00', '2023-05-15 17:00:00', '2023-06-10 09:00:00', NULL,
        '<p>为进一步加强我区事业单位人才队伍建设，根据有关规定，决定面向社会公开招聘事业单位工作人员...</p>', NULL, 0, 2,
        '2025-09-11 10:55:06', '2025-09-11 10:55:06', NULL, 0, NULL);
COMMIT;

-- ----------------------------
-- Table structure for no_notice_attachment
-- ----------------------------
DROP TABLE IF EXISTS `no_notice_attachment`;
CREATE TABLE `no_notice_attachment`
(
    `id`             int          NOT NULL AUTO_INCREMENT COMMENT '附件ID',
    `notice_id`      int          NOT NULL COMMENT '公告ID',
    `name`           varchar(255) NOT NULL COMMENT '附件名称',
    `file_path`      varchar(255) NOT NULL COMMENT '文件路径',
    `file_size`      bigint                DEFAULT '0' COMMENT '文件大小(字节)',
    `file_type`      varchar(100)          DEFAULT NULL COMMENT '文件类型',
    `download_count` int                   DEFAULT '0' COMMENT '下载次数',
    `created_at`     datetime     NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
    `updated_at`     datetime     NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
    PRIMARY KEY (`id`),
    KEY `idx_notice_id` (`notice_id`)
) ENGINE = InnoDB
  AUTO_INCREMENT = 5
  DEFAULT CHARSET = utf8mb4
  COLLATE = utf8mb4_0900_ai_ci COMMENT ='公告附件表';

-- ----------------------------
-- Records of no_notice_attachment
-- ----------------------------
BEGIN;
INSERT INTO `no_notice_attachment` (`id`, `notice_id`, `name`, `file_path`, `file_size`, `file_type`, `download_count`,
                                    `created_at`, `updated_at`)
VALUES (1, 1, '2023年朝阳区公务员招录岗位表.xlsx', '/attachments/gov/20230315/positions.xlsx', 102400,
        'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', 156, '2025-09-11 10:59:11',
        '2025-09-11 10:59:11');
INSERT INTO `no_notice_attachment` (`id`, `notice_id`, `name`, `file_path`, `file_size`, `file_type`, `download_count`,
                                    `created_at`, `updated_at`)
VALUES (2, 1, '公务员招录报考指南.pdf', '/attachments/gov/20230315/guide.pdf', 786432, 'application/pdf', 203,
        '2025-09-11 10:59:11', '2025-09-11 10:59:11');
INSERT INTO `no_notice_attachment` (`id`, `notice_id`, `name`, `file_path`, `file_size`, `file_type`, `download_count`,
                                    `created_at`, `updated_at`)
VALUES (3, 2, '天河区教师招聘岗位表.xlsx', '/attachments/edu/20230401/teacher_positions.xlsx', 87040,
        'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', 321, '2025-09-11 10:59:11',
        '2025-09-11 10:59:11');
INSERT INTO `no_notice_attachment` (`id`, `notice_id`, `name`, `file_path`, `file_size`, `file_type`, `download_count`,
                                    `created_at`, `updated_at`)
VALUES (4, 3, '南山区人民医院招聘报名表.docx', '/attachments/medical/20230320/form.docx', 56320,
        'application/vnd.openxmlformats-officedocument.wordprocessingml.document', 189, '2025-09-11 10:59:11',
        '2025-09-11 10:59:11');
COMMIT;

-- ----------------------------
-- Table structure for no_notice_comment
-- ----------------------------
DROP TABLE IF EXISTS `no_notice_comment`;
CREATE TABLE `no_notice_comment`
(
    `id`           bigint unsigned                                       NOT NULL AUTO_INCREMENT COMMENT '评论ID',
    `notice_id`    bigint unsigned                                       NOT NULL COMMENT '关联公告ID',
    `user_id`      bigint unsigned  DEFAULT NULL COMMENT '用户ID（空=匿名）',
    `content`      text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '评论内容',
    `parent_id`    bigint unsigned  DEFAULT NULL COMMENT '父评论ID（回复功能）',
    `is_anonymous` tinyint(1)       DEFAULT '0' COMMENT '是否匿名',
    `audit_status` tinyint unsigned DEFAULT '0' COMMENT '审核状态：0-待审，1-通过，2-拒绝',
    `created_at`   datetime         DEFAULT CURRENT_TIMESTAMP,
    `updated_at`   datetime         DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
    PRIMARY KEY (`id`),
    KEY `idx_notice` (`notice_id`),
    KEY `idx_parent` (`parent_id`)
) ENGINE = InnoDB
  AUTO_INCREMENT = 13
  DEFAULT CHARSET = utf8mb4
  COLLATE = utf8mb4_unicode_ci COMMENT ='公告评论表';

-- ----------------------------
-- Records of no_notice_comment
-- ----------------------------
BEGIN;
INSERT INTO `no_notice_comment` (`id`, `notice_id`, `user_id`, `content`, `parent_id`, `is_anonymous`, `audit_status`,
                                 `created_at`, `updated_at`)
VALUES (6, 1, NULL, '请问这个招录对学历有什么要求？', NULL, 1, 1, '2025-09-11 10:59:20', '2025-09-11 10:59:20');
INSERT INTO `no_notice_comment` (`id`, `notice_id`, `user_id`, `content`, `parent_id`, `is_anonymous`, `audit_status`,
                                 `created_at`, `updated_at`)
VALUES (7, 1, 1001, '本科及以上学历即可报考，部分岗位要求硕士', 1, 0, 1, '2025-09-11 10:59:20', '2025-09-11 10:59:20');
INSERT INTO `no_notice_comment` (`id`, `notice_id`, `user_id`, `content`, `parent_id`, `is_anonymous`, `audit_status`,
                                 `created_at`, `updated_at`)
VALUES (8, 2, 1002, '请问应届生可以报考吗？', NULL, 0, 1, '2025-09-11 10:59:20', '2025-09-11 10:59:20');
INSERT INTO `no_notice_comment` (`id`, `notice_id`, `user_id`, `content`, `parent_id`, `is_anonymous`, `audit_status`,
                                 `created_at`, `updated_at`)
VALUES (9, 2, NULL, '同问，我是2023届毕业生，想了解是否有岗位限制', 3, 1, 1, '2025-09-11 10:59:20',
        '2025-09-11 10:59:20');
INSERT INTO `no_notice_comment` (`id`, `notice_id`, `user_id`, `content`, `parent_id`, `is_anonymous`, `audit_status`,
                                 `created_at`, `updated_at`)
VALUES (10, 2, 1003, '应届生可以报考，大部分岗位没有工作经验要求', 3, 0, 1, '2025-09-11 10:59:20',
        '2025-09-11 10:59:20');
INSERT INTO `no_notice_comment` (`id`, `notice_id`, `user_id`, `content`, `parent_id`, `is_anonymous`, `audit_status`,
                                 `created_at`, `updated_at`)
VALUES (11, 3, 1004, '请问护士岗位需要什么资格证书？', NULL, 0, 1, '2025-09-11 10:59:20', '2025-09-11 10:59:20');
INSERT INTO `no_notice_comment` (`id`, `notice_id`, `user_id`, `content`, `parent_id`, `is_anonymous`, `audit_status`,
                                 `created_at`, `updated_at`)
VALUES (12, 4, NULL, '考试地点可以自选吗？', NULL, 1, 1, '2025-09-11 10:59:20', '2025-09-11 10:59:20');
COMMIT;

-- ----------------------------
-- Table structure for no_notice_stats
-- ----------------------------
DROP TABLE IF EXISTS `no_notice_stats`;
CREATE TABLE `no_notice_stats`
(
    `id`               bigint unsigned NOT NULL AUTO_INCREMENT COMMENT '统计ID',
    `notice_id`        bigint unsigned NOT NULL COMMENT '关联公告ID',
    `view_count`       int unsigned DEFAULT '0' COMMENT '总阅读量（去重）',
    `today_view_count` int unsigned DEFAULT '0' COMMENT '今日阅读量',
    `share_count`      int unsigned DEFAULT '0' COMMENT '转发量',
    `comment_count`    int unsigned DEFAULT '0' COMMENT '评论量',
    `like_count`       int unsigned DEFAULT '0' COMMENT '点赞数',
    `last_viewed_at`   datetime     DEFAULT NULL COMMENT '最后查看时间',
    `updated_at`       datetime     DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
    PRIMARY KEY (`id`),
    UNIQUE KEY `notice_id` (`notice_id`),
    KEY `idx_notice` (`notice_id`)
) ENGINE = InnoDB
  AUTO_INCREMENT = 10
  DEFAULT CHARSET = utf8mb4
  COLLATE = utf8mb4_unicode_ci COMMENT ='公告行为统计表';

-- ----------------------------
-- Records of no_notice_stats
-- ----------------------------
BEGIN;
INSERT INTO `no_notice_stats` (`id`, `notice_id`, `view_count`, `today_view_count`, `share_count`, `comment_count`,
                               `like_count`, `last_viewed_at`, `updated_at`)
VALUES (5, 1, 1256, 45, 89, 32, 156, '2023-03-20 14:30:22', '2025-09-11 10:59:20');
INSERT INTO `no_notice_stats` (`id`, `notice_id`, `view_count`, `today_view_count`, `share_count`, `comment_count`,
                               `like_count`, `last_viewed_at`, `updated_at`)
VALUES (6, 2, 2103, 89, 156, 78, 320, '2023-03-20 15:45:11', '2025-09-11 10:59:20');
INSERT INTO `no_notice_stats` (`id`, `notice_id`, `view_count`, `today_view_count`, `share_count`, `comment_count`,
                               `like_count`, `last_viewed_at`, `updated_at`)
VALUES (7, 3, 987, 32, 67, 23, 98, '2023-03-20 13:20:05', '2025-09-11 10:59:20');
INSERT INTO `no_notice_stats` (`id`, `notice_id`, `view_count`, `today_view_count`, `share_count`, `comment_count`,
                               `like_count`, `last_viewed_at`, `updated_at`)
VALUES (8, 4, 5678, 12, 342, 215, 890, '2023-03-20 10:15:33', '2025-09-11 10:59:20');
INSERT INTO `no_notice_stats` (`id`, `notice_id`, `view_count`, `today_view_count`, `share_count`, `comment_count`,
                               `like_count`, `last_viewed_at`, `updated_at`)
VALUES (9, 5, 123, 8, 5, 2, 10, '2023-03-20 09:40:18', '2025-09-11 10:59:20');
COMMIT;

-- ----------------------------
-- Table structure for no_notice_stats_log
-- ----------------------------
DROP TABLE IF EXISTS `no_notice_stats_log`;
CREATE TABLE `no_notice_stats_log`
(
    `id`            int        NOT NULL AUTO_INCREMENT COMMENT '日志ID',
    `notice_id`     int        NOT NULL COMMENT '公告ID',
    `action_type`   tinyint(1) NOT NULL COMMENT '行为类型：1-查看，2-点赞，3-取消点赞，4-下载附件',
    `ip_address`    varchar(50)         DEFAULT NULL COMMENT '操作IP地址',
    `user_agent`    text COMMENT '用户代理信息',
    `attachment_id` int                 DEFAULT NULL COMMENT '附件ID（仅下载时有效）',
    `created_at`    datetime   NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '操作时间',
    PRIMARY KEY (`id`),
    KEY `idx_notice_id` (`notice_id`),
    KEY `idx_action_type` (`action_type`),
    KEY `idx_created_at` (`created_at`)
) ENGINE = InnoDB
  AUTO_INCREMENT = 8
  DEFAULT CHARSET = utf8mb4
  COLLATE = utf8mb4_0900_ai_ci COMMENT ='公告统计日志表';

-- ----------------------------
-- Records of no_notice_stats_log
-- ----------------------------
BEGIN;
INSERT INTO `no_notice_stats_log` (`id`, `notice_id`, `action_type`, `ip_address`, `user_agent`, `attachment_id`,
                                   `created_at`)
VALUES (1, 1, 1, '123.125.71.100',
        'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.0.0.0 Safari/537.36',
        NULL, '2023-03-20 08:15:22');
INSERT INTO `no_notice_stats_log` (`id`, `notice_id`, `action_type`, `ip_address`, `user_agent`, `attachment_id`,
                                   `created_at`)
VALUES (2, 1, 4, '123.125.71.100',
        'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.0.0.0 Safari/537.36',
        1, '2023-03-20 08:16:45');
INSERT INTO `no_notice_stats_log` (`id`, `notice_id`, `action_type`, `ip_address`, `user_agent`, `attachment_id`,
                                   `created_at`)
VALUES (3, 2, 1, '210.73.56.89',
        'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.3 Safari/605.1.15',
        NULL, '2023-03-20 09:20:11');
INSERT INTO `no_notice_stats_log` (`id`, `notice_id`, `action_type`, `ip_address`, `user_agent`, `attachment_id`,
                                   `created_at`)
VALUES (4, 2, 2, '210.73.56.89',
        'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.3 Safari/605.1.15',
        NULL, '2023-03-20 09:21:33');
INSERT INTO `no_notice_stats_log` (`id`, `notice_id`, `action_type`, `ip_address`, `user_agent`, `attachment_id`,
                                   `created_at`)
VALUES (5, 3, 1, '183.60.212.11',
        'Mozilla/5.0 (iPhone; CPU iPhone OS 16_3_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148',
        NULL, '2023-03-20 10:05:47');
INSERT INTO `no_notice_stats_log` (`id`, `notice_id`, `action_type`, `ip_address`, `user_agent`, `attachment_id`,
                                   `created_at`)
VALUES (6, 3, 3, '183.60.212.11',
        'Mozilla/5.0 (iPhone; CPU iPhone OS 16_3_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148',
        NULL, '2023-03-20 10:06:12');
INSERT INTO `no_notice_stats_log` (`id`, `notice_id`, `action_type`, `ip_address`, `user_agent`, `attachment_id`,
                                   `created_at`)
VALUES (7, 4, 1, '117.136.0.200',
        'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.0.0 Safari/537.36 Edg/110.0.1587.69',
        NULL, '2023-03-20 11:30:05');
COMMIT;

-- ----------------------------
-- Table structure for no_notice_tag
-- ----------------------------
DROP TABLE IF EXISTS `no_notice_tag`;
CREATE TABLE `no_notice_tag`
(
    `id`         int      NOT NULL AUTO_INCREMENT COMMENT 'ID',
    `notice_id`  int      NOT NULL COMMENT '公告ID',
    `tag_id`     int      NOT NULL COMMENT '标签ID',
    `created_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
    PRIMARY KEY (`id`),
    UNIQUE KEY `uk_notice_tag` (`notice_id`, `tag_id`),
    KEY `idx_tag_id` (`tag_id`)
) ENGINE = InnoDB
  AUTO_INCREMENT = 11
  DEFAULT CHARSET = utf8mb4
  COLLATE = utf8mb4_0900_ai_ci COMMENT ='公告与标签关联表';

-- ----------------------------
-- Records of no_notice_tag
-- ----------------------------
BEGIN;
INSERT INTO `no_notice_tag` (`id`, `notice_id`, `tag_id`, `created_at`)
VALUES (1, 1, 2, '2025-09-11 10:59:20');
INSERT INTO `no_notice_tag` (`id`, `notice_id`, `tag_id`, `created_at`)
VALUES (2, 1, 3, '2025-09-11 10:59:20');
INSERT INTO `no_notice_tag` (`id`, `notice_id`, `tag_id`, `created_at`)
VALUES (3, 2, 2, '2025-09-11 10:59:20');
INSERT INTO `no_notice_tag` (`id`, `notice_id`, `tag_id`, `created_at`)
VALUES (4, 2, 4, '2025-09-11 10:59:20');
INSERT INTO `no_notice_tag` (`id`, `notice_id`, `tag_id`, `created_at`)
VALUES (5, 3, 1, '2025-09-11 10:59:20');
INSERT INTO `no_notice_tag` (`id`, `notice_id`, `tag_id`, `created_at`)
VALUES (6, 3, 4, '2025-09-11 10:59:20');
INSERT INTO `no_notice_tag` (`id`, `notice_id`, `tag_id`, `created_at`)
VALUES (7, 4, 2, '2025-09-11 10:59:20');
INSERT INTO `no_notice_tag` (`id`, `notice_id`, `tag_id`, `created_at`)
VALUES (8, 4, 3, '2025-09-11 10:59:20');
INSERT INTO `no_notice_tag` (`id`, `notice_id`, `tag_id`, `created_at`)
VALUES (9, 5, 2, '2025-09-11 10:59:20');
INSERT INTO `no_notice_tag` (`id`, `notice_id`, `tag_id`, `created_at`)
VALUES (10, 5, 5, '2025-09-11 10:59:20');
COMMIT;

-- ----------------------------
-- Table structure for no_notice_type
-- ----------------------------
DROP TABLE IF EXISTS `no_notice_type`;
CREATE TABLE `no_notice_type`
(
    `id`          int         NOT NULL AUTO_INCREMENT COMMENT '类型ID',
    `name`        varchar(50) NOT NULL COMMENT '类型名称（如公务员、事业单位等）',
    `parent_id`   int                  DEFAULT NULL COMMENT '父类型ID',
    `description` varchar(255)         DEFAULT NULL COMMENT '类型描述',
    `sort`        int                  DEFAULT '0' COMMENT '排序序号',
    `created_at`  datetime    NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
    `updated_at`  datetime    NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
    PRIMARY KEY (`id`),
    KEY `idx_parent_id` (`parent_id`)
) ENGINE = InnoDB
  AUTO_INCREMENT = 7
  DEFAULT CHARSET = utf8mb4
  COLLATE = utf8mb4_0900_ai_ci COMMENT ='公告类型表';

-- ----------------------------
-- Records of no_notice_type
-- ----------------------------
BEGIN;
INSERT INTO `no_notice_type` (`id`, `name`, `parent_id`, `description`, `sort`, `created_at`, `updated_at`)
VALUES (1, '公务员', NULL, '各类公务员招聘公告', 1, '2025-09-11 10:55:06', '2025-09-11 10:55:06');
INSERT INTO `no_notice_type` (`id`, `name`, `parent_id`, `description`, `sort`, `created_at`, `updated_at`)
VALUES (2, '事业单位', NULL, '事业单位招聘信息', 2, '2025-09-11 10:55:06', '2025-09-11 10:55:06');
INSERT INTO `no_notice_type` (`id`, `name`, `parent_id`, `description`, `sort`, `created_at`, `updated_at`)
VALUES (3, '教师招聘', 2, '各类学校教师招聘', 1, '2025-09-11 10:55:06', '2025-09-11 10:55:06');
INSERT INTO `no_notice_type` (`id`, `name`, `parent_id`, `description`, `sort`, `created_at`, `updated_at`)
VALUES (4, '医疗招聘', 2, '医院及医疗相关单位招聘', 2, '2025-09-11 10:55:06', '2025-09-11 10:55:06');
INSERT INTO `no_notice_type` (`id`, `name`, `parent_id`, `description`, `sort`, `created_at`, `updated_at`)
VALUES (5, '国家公务员', 1, '中央国家机关公务员招聘', 1, '2025-09-11 10:55:06', '2025-09-11 10:55:06');
INSERT INTO `no_notice_type` (`id`, `name`, `parent_id`, `description`, `sort`, `created_at`, `updated_at`)
VALUES (6, '地方公务员', 1, '各省市地方公务员招聘', 2, '2025-09-11 10:55:06', '2025-09-11 10:55:06');
COMMIT;

-- ----------------------------
-- Table structure for no_region
-- ----------------------------
DROP TABLE IF EXISTS `no_region`;
CREATE TABLE `no_region`
(
    `id`         int          NOT NULL AUTO_INCREMENT COMMENT '地区ID',
    `parent_id`  int                   DEFAULT NULL COMMENT '父级地区ID（省份的父级为NULL）',
    `name`       varchar(100) NOT NULL COMMENT '地区名称',
    `level`      tinyint(1)   NOT NULL COMMENT '层级：1-省份，2-地级市',
    `sort`       int                   DEFAULT '0' COMMENT '排序序号',
    `created_at` datetime     NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
    `updated_at` datetime     NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
    PRIMARY KEY (`id`),
    KEY `idx_parent_id` (`parent_id`)
) ENGINE = InnoDB
  AUTO_INCREMENT = 9
  DEFAULT CHARSET = utf8mb4
  COLLATE = utf8mb4_0900_ai_ci COMMENT ='地区表（省份和地级市）';

-- ----------------------------
-- Records of no_region
-- ----------------------------
BEGIN;
INSERT INTO `no_region` (`id`, `parent_id`, `name`, `level`, `sort`, `created_at`, `updated_at`)
VALUES (1, NULL, '北京市', 1, 1, '2025-09-11 10:55:06', '2025-09-11 10:55:06');
INSERT INTO `no_region` (`id`, `parent_id`, `name`, `level`, `sort`, `created_at`, `updated_at`)
VALUES (2, NULL, '上海市', 1, 2, '2025-09-11 10:55:06', '2025-09-11 10:55:06');
INSERT INTO `no_region` (`id`, `parent_id`, `name`, `level`, `sort`, `created_at`, `updated_at`)
VALUES (3, NULL, '广东省', 1, 3, '2025-09-11 10:55:06', '2025-09-11 10:55:06');
INSERT INTO `no_region` (`id`, `parent_id`, `name`, `level`, `sort`, `created_at`, `updated_at`)
VALUES (4, 1, '北京市', 2, 1, '2025-09-11 10:55:06', '2025-09-11 10:55:06');
INSERT INTO `no_region` (`id`, `parent_id`, `name`, `level`, `sort`, `created_at`, `updated_at`)
VALUES (5, 2, '上海市', 2, 1, '2025-09-11 10:55:06', '2025-09-11 10:55:06');
INSERT INTO `no_region` (`id`, `parent_id`, `name`, `level`, `sort`, `created_at`, `updated_at`)
VALUES (6, 3, '广州市', 2, 1, '2025-09-11 10:55:06', '2025-09-11 10:55:06');
INSERT INTO `no_region` (`id`, `parent_id`, `name`, `level`, `sort`, `created_at`, `updated_at`)
VALUES (7, 3, '深圳市', 2, 2, '2025-09-11 10:55:06', '2025-09-11 10:55:06');
INSERT INTO `no_region` (`id`, `parent_id`, `name`, `level`, `sort`, `created_at`, `updated_at`)
VALUES (8, 3, '佛山市', 2, 3, '2025-09-11 10:55:06', '2025-09-11 10:55:06');
COMMIT;

-- ----------------------------
-- Table structure for no_tag
-- ----------------------------
DROP TABLE IF EXISTS `no_tag`;
CREATE TABLE `no_tag`
(
    `id`         int         NOT NULL AUTO_INCREMENT COMMENT '标签ID',
    `name`       varchar(50) NOT NULL COMMENT '标签名称',
    `created_at` datetime    NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
    `updated_at` datetime    NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
    PRIMARY KEY (`id`),
    UNIQUE KEY `uk_name` (`name`)
) ENGINE = InnoDB
  AUTO_INCREMENT = 6
  DEFAULT CHARSET = utf8mb4
  COLLATE = utf8mb4_0900_ai_ci COMMENT ='标签表';

-- ----------------------------
-- Records of no_tag
-- ----------------------------
BEGIN;
INSERT INTO `no_tag` (`id`, `name`, `created_at`, `updated_at`)
VALUES (1, '急聘', '2025-09-11 10:55:06', '2025-09-11 10:55:06');
INSERT INTO `no_tag` (`id`, `name`, `created_at`, `updated_at`)
VALUES (2, '编制内', '2025-09-11 10:55:06', '2025-09-11 10:55:06');
INSERT INTO `no_tag` (`id`, `name`, `created_at`, `updated_at`)
VALUES (3, '应届生可报', '2025-09-11 10:55:06', '2025-09-11 10:55:06');
INSERT INTO `no_tag` (`id`, `name`, `created_at`, `updated_at`)
VALUES (4, '五险一金', '2025-09-11 10:55:06', '2025-09-11 10:55:06');
INSERT INTO `no_tag` (`id`, `name`, `created_at`, `updated_at`)
VALUES (5, '周末双休', '2025-09-11 10:55:06', '2025-09-11 10:55:06');
COMMIT;

SET FOREIGN_KEY_CHECKS = 1;
